package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

public class LoadPersonInfoApi extends BaseApi {

    LoadPersonInfo req;

    public LoadPersonInfoApi(String expert_id) {
        req = new LoadPersonInfo(expert_id);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).loadPersonInfo(requestBody);
    }

    class LoadPersonInfo {
        private String expert_id;

        public LoadPersonInfo(String expert_id) {
            this.expert_id = expert_id;
        }
    }
}
